﻿using KinonekoSoftware.Foundation.Patterns;
using KinonekoSoftware.Foundation;
using KinonekoSoftware.Foundation.UI.ViewModels;

namespace KinonekoSoftware.Foundation.UI.Core
{
    public interface IDialogService
    {
        Task<Result<T>> Dialog<T>(IObjectDialog<T>           viewModel);
        Task<Result<T>> Dialog<T>(IObjectDialog<T>           viewModel, IDialogContext context);
        Task<Result<T>> Dialog<T>(IAsyncObjectDialog<T>      viewModel);
        Task<Result<T>> Dialog<T>(IAsyncObjectDialog<T>      viewModel, IDialogContext context);
        Task<Result<IList<T>>> Dialog<T>(ISelectionDialog<T> viewModel) where T : class;
        Task<Result<IList<T>>> Dialog<T>(ISelectionDialog<T> viewModel, IDialogContext context) where T : class;
        
        
        Task<bool>            Question(IBooleanDialog    viewModel);
        Task<bool>            Question(IBooleanDialog    viewModel,   IDialogContext context);
        Task<TripleSelection> Question(string           description, string        option1Text, string option2Text);

        // Task Notify<T>() where T : INotifyDialog;
        // Task Notify<T>(, IDialogContext context) where T : INotifyDialog;
        Task Notify(INotifyDialog viewModel);
        Task Notify(INotifyDialog viewModel, IDialogContext context);
        
        
        Task<bool> DangerOperation(string title, string description, int count = 0);
        Task<bool> SuccessOperation(string title, string description, int count = 0);
        Task<bool> InfoOperation(string title, string description, int count = 0);
        Task<bool> WarningOperation(string title, string description, int count = 0);
        Task<bool> ObsoletedOperation(string title, string description, int count = 0);
        
        Task Danger(string title, string description, int count = 0);
        Task Success(string title, string description, int count = 0);
        Task Info(string title, string description, int count = 0);
        Task Warning(string title, string description, int count = 0);
        Task Obsoleted(string title, string description, int count = 0);
    }
}